<html xmlns="http://www.w3.org/1999/xhtml" xmlns:c="http://java.sun.com/jstl/core"
      xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:t="http://myfaces.apache.org/tomahawk"
      xmlns:v="http://corejsf.com/validator">

<f:view>
<f:loadBundle var="text" basename="#{cpxsForm.bundleName}"/>
    <head>
        <title>#{text['cpxsDetail.title']}</title>
        <meta name="heading" content="#{text['cpxsDetail.heading']}"/>
        <style type="text/css">
            .jscalendar-DB-div-style {
                position: absolute;
                margin-top: -120px;
                margin-left: -508px;
            }
    </style>
    </head>
<body id="cpxsForm">

<h:form id="cpxsForm" onsubmit="return validateCpxsForm(this)">
<h:inputHidden value="#{cpxsForm.cpxs.id}" id="id"/>
<h:inputHidden value="#{cpxsForm.cpxs.version}" id="version"/>
<h:panelGrid columns="6">
    <h:outputLabel styleClass="desc" for="xh" value="#{text['cpxs.xh']}"/>
    <t:message for="xh" styleClass="fieldError"/>
    <h:inputText styleClass="text medium" id="xh" value="#{cpxsForm.cpxs.xh}" required="false" maxlength="255">
    </h:inputText>
    <h:outputLabel styleClass="desc" for="gycpmc" value="#{text['cpxs.gycpmc']}"/>
    <t:message for="gycpmc" styleClass="fieldError"/>
    <h:inputText styleClass="text medium" id="gycpmc" value="#{cpxsForm.cpxs.gycpmc}" required="true" maxlength="50">
        <v:commonsValidator type="required" arg="#{text['cpxs.gycpmc']}"/>
    </h:inputText>
    <h:outputLabel styleClass="desc" for="hkjsfs" value="#{text['cpxs.hkjsfs']}"/>
    <t:message for="hkjsfs" styleClass="fieldError"/>
    <h:inputText styleClass="text medium" id="hkjsfs" value="#{cpxsForm.cpxs.hkjsfs}" required="false" maxlength="50">
    </h:inputText>
    <h:outputLabel styleClass="desc" for="ncl" value="#{text['cpxs.ncl']}"/>
    <t:message for="ncl" styleClass="fieldError"/>
    <h:inputText styleClass="text medium" id="ncl" value="#{cpxsForm.cpxs.ncl}" required="false" maxlength="255">
    </h:inputText>
    <h:outputLabel styleClass="desc" for="nscnl" value="#{text['cpxs.nscnl']}"/>
    <t:message for="nscnl" styleClass="fieldError"/>
    <h:inputText styleClass="text medium" id="nscnl" value="#{cpxsForm.cpxs.nscnl}" required="false" maxlength="255">
    </h:inputText>
    <h:outputLabel styleClass="desc" for="ny" value="#{text['cpxs.ny']}"/>
    <t:message for="ny" styleClass="fieldError"/>
    <h:inputText styleClass="text medium" id="ny" value="#{cpxsForm.cpxs.ny}" required="false" maxlength="255">
    </h:inputText>
    <h:outputLabel styleClass="desc" for="qymc" value="#{text['cpxs.qymc']}"/>
    <t:message for="qymc" styleClass="fieldError"/>
    <h:inputText styleClass="text medium" id="qymc" value="#{cpxsForm.cpxs.qymc}" required="false" maxlength="50">
    </h:inputText>
    <h:outputLabel styleClass="desc" for="qyxse" value="#{text['cpxs.qyxse']}"/>
    <t:message for="qyxse" styleClass="fieldError"/>
    <h:inputText styleClass="text medium" id="qyxse" value="#{cpxsForm.cpxs.qyxse}" required="false" maxlength="255">
    </h:inputText>
    <h:outputLabel styleClass="desc" for="qyzyl" value="#{text['cpxs.qyzyl']}"/>
    <t:message for="qyzyl" styleClass="fieldError"/>
    <h:inputText styleClass="text medium" id="qyzyl" value="#{cpxsForm.cpxs.qyzyl}" required="false" maxlength="255">
    </h:inputText>
    <h:outputLabel styleClass="desc" for="sfwd" value="#{text['cpxs.sfwd']}"/>
    <t:message for="sfwd" styleClass="fieldError"/>
    <h:selectBooleanCheckbox value="#{cpxsForm.cpxs.sfwd}" id="sfwd" styleClass="checkbox"/>
    <h:outputLabel styleClass="desc" for="xsze" value="#{text['cpxs.xsze']}"/>
    <t:message for="xsze" styleClass="fieldError"/>
    <h:inputText styleClass="text medium" id="xsze" value="#{cpxsForm.cpxs.xsze}" required="false" maxlength="255">
    </h:inputText>
    <h:outputLabel styleClass="desc" for="zxl" value="#{text['cpxs.zxl']}"/>
    <t:message for="zxl" styleClass="fieldError"/>
    <h:inputText styleClass="text medium" id="zxl" value="#{cpxsForm.cpxs.zxl}" required="false" maxlength="16">
    </h:inputText>
</h:panelGrid>

    <h:panelGroup styleClass="buttonBar bottom">
        <h:commandButton value="#{text['button.save']}" action="#{cpxsForm.save}" id="save" styleClass="button"/>

        <c:if test="${not empty cpxsForm.cpxs.id}">
        <h:commandButton value="#{text['button.delete']}" action="#{cpxsForm.delete}"
            id="delete" styleClass="button" onclick="bCancel=true; return confirmDelete('Cpxs')"/>
        </c:if>

        <h:commandButton value="#{text['button.cancel']}" action="cancel" immediate="true"
            id="cancel" styleClass="button" onclick="bCancel=true"/>
    </h:panelGroup>
</h:form>

<v:validatorScript functionName="validateCpxsForm"/>

<script type="text/javascript">
    //Form.focusFirstElement($('cpxsForm'));
    highlightFormElements();
</script>

</body>
</f:view>
</html>
